package com.guigu.dh.sms.feign;

import com.guigu.dh.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient("service-sms")
public interface SmsFeign {

    // 接收手机号并存入redis中
    @GetMapping("/api/sms/receivePhone/{phone}")
    Result receivePhone(@PathVariable String phone);

    // 根据手机号查询存不存在
    @GetMapping("/api/sms/hasPhone/{phone}")
    Boolean hasPhone (@PathVariable String phone);
}
